import request from '@/utils/request'
const baseUrl = process.env.VUE_APP_TMS_CONSOLE_HOST
// 车辆类型列表下拉框
export function getCarType() {
  return request({
    url: `${baseUrl}/api/v1/tms-car-type/selector`,
    method: 'get'
  })
}
// 车辆关系列表
export function carRelationList(data) {
  return request({
    url: `${baseUrl}/api/v1/tms-car-relation/search`,
    method: 'post',
    data: data
  })
}
// 获取车辆列表
export function carList(data) {
  return request({
    url: `${baseUrl}/api/v1/tms-car/search`,
    method: 'post',
    data: data
  })
}

// 车辆详情
export function carDetail(id) {
  return request({
    url: `${baseUrl}/api/v1/tms-car/${id}`,
    method: 'get'
  })
}
// 日志查询
export function operation(aimId) {
  return request({
    url: `${baseUrl}/api/v1/audit-log/${aimId}`,
    method: 'get'
  })
}

// 车辆审核
export function carAudit(data) {
  return request({
    url: `${baseUrl}/api/v1/tms-car/review`,
    method: 'post',
    data: data
  })
}

// 能源类型
export function energyType(data) {
  return request({
    url: `${baseUrl}/api/v1/tms-car-energy-type/selector`,
    method: 'get',
    data: data
  })
}

// 根据车牌号进行模糊查询
export function plateFuzzy(data) {
  return request({
    url: `${baseUrl}/api/v1/tms-car/selector`,
    method: 'get',
    data: data
  })
}
// 车长下拉框查询
export function getCarLength() {
  return request({
    url: `${baseUrl}/api/v1/tms-car-length-type/selector`,
    method: 'get'
  })
}

